//
//  LFBaseViewController.m
//  shenghuoquan
//
//  Created by macs on 16/1/22.
//  Copyright © 2016年 gxf. All rights reserved.
//

#import "LFBaseViewController.h"
#import "MBProgressHUD.h"
#import "UIView+Toast.h"

@interface LFBaseViewController () {
  MBProgressHUD *HUD;
}
@end

@implementation LFBaseViewController

- (void)viewDidLoad {
  [super viewDidLoad];
  // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
  [super didReceiveMemoryWarning];
  // Dispose of any resources that can be recreated.
}

- (void)showLoadView {
  HUD = [[MBProgressHUD alloc] initWithView:self.view];
  [HUD show:YES];
  [self.view addSubview:HUD];
}

- (void)dismissLoadView {
  if (HUD) {
    [HUD removeFromSuperview];
    [HUD hide:YES];
    HUD = nil;
  }
}

- (void)showToast:(NSString *)message {
  [self.view makeToast:message];
}

@end
